package com.dnapipeline.modelManage.entity;

import javax.persistence.*;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.JsonNode;
import java.io.Serializable;

@Entity
public class ProfileModel implements Serializable {

    private static final long serialVersionUID = 1L;

    private String deviceKey;

    @Id
    private String profileModelKey; // 主键

    public ProfileModel() {
        // 按照设计要求默认生成deviceKey，使用Math.random().toString()方式生成
        this.profileModelKey = Double.toString(Math.random());
    }

    private String characteristicNodeId;

    @Column(length = 255)
    private String serviceName;

    @Column(length = 255)
    private String characteristicName;

    @Column(length = 50)
    private String permissions;

    @Column(length = 50)
    private String characteristicType;

    @Column(length = 500)
    private String descCh;

    @Lob
    private String value;

    // Getters and Setters

    public String getDeviceKey() {
        return deviceKey;
    }

    public void setDeviceKey(String deviceKey) {
        this.deviceKey = deviceKey;
    }

    public String getCharacteristicNodeId() {
        return characteristicNodeId;
    }

    public void setCharacteristicNodeId(String characteristicNodeId) {
        this.characteristicNodeId = characteristicNodeId;
    }

    public String getServiceNameEn() {
        return serviceName;
    }

    public void setServiceNameEn(String serviceNameEn) {
        this.serviceName = serviceNameEn;
    }

    public String getCharacteristicName() {
        return characteristicName;
    }

    public void setCharacteristicName(String characteristicName) {
        this.characteristicName = characteristicName;
    }

    public String getPermissions() {
        return permissions;
    }

    public void setPermissions(String permissions) {
        this.permissions = permissions;
    }

    public String getCharacteristicType() {
        return characteristicType;
    }

    public void setCharacteristicType(String characteristicType) {
        this.characteristicType = characteristicType;
    }

    public String getDescCh() {
        return descCh;
    }

    public void setDescCh(String descCh) {
        this.descCh = descCh;
    }

    public String getValue() {
        return value;
    }

    public void setValue(String value) {
        this.value = value;
    }

    public String getProfileModelKey() {
        return profileModelKey;
    }

    public void setProfileModelKey(String profileModelKey) {
        this.profileModelKey = profileModelKey;
    }

}
